﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Profile;
using System.Data;

namespace WebSite.admin.order
{
    public partial class order_templates : BaseAdmin
    {


        // Methods
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            SQLAccess.DoSql("update DB_Shopconfig set ordercopy='" + this.WE_NewsContent.Text.Replace("'", "''") + "' where shopid=1");
            base.Response.Write("<script language='javascript'>alert('修改成功');window.location.href='order_templates.aspx';</script>");
            base.Response.End();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
           
            this.ImageButton1.Attributes["onclick"] = "return clicka();";
            if (!base.IsPostBack)
            {
                this.upbind();
            }
        }

        private void upbind()
        {
            string sql = "select top 1 * from DB_Shopconfig where shopid=1";
            DataTable table = new DataTable();
            table = SQLAccess.GreatDs(sql).Tables[0];
            this.WE_NewsContent.Text = table.Rows[0]["ordercopy"].ToString();
        }


    }
}